/*  
 *  main.c - Linux kernel module(lkm) test.
 */
#include <linux/module.h>	/* Needed by all modules */
#include <linux/kernel.h>	/* Needed for KERN_DEBUG */
#include <linux/init.h>		/* Needed for the macros */
#include <linux/version.h>	/* Needed for the version */

#include "input.h"
#include "timer.h"
#include "procfs.h"

#define DRIVER_AUTHOR "Sachin Desai <sachinpdesai@hotmail.com>"
#define DRIVER_DESC   "Linux kernel module(lkm) test"

static int __init init_lkm_test(void)
{
    int status;

    printk(KERN_INFO "Linux Kernel Module test\n");

    status = read_input();

    status = time_profile();

    status = create_proc_entry();

#if LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0)
    printk(KERN_INFO "old Linux Kernel\n");
#else
    printk(KERN_INFO "new Linux Kernel\n");
#endif

    return (0);
}

static void __exit exit_lkm_test(void)
{
    int status;

    status = delete_proc_entry();
}

module_init(init_lkm_test);
module_exit(exit_lkm_test);

/* 
 * Get rid of taint message by declaring code as GPL. 
 */
MODULE_LICENSE("GPL");
MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DESCRIPTION(DRIVER_DESC);

